package com.dinner.util;

import java.util.List;

import com.dinner.model.MenuType;
import com.dinner.model.Seller;

public final class EntityListUtils {
	
	public static MenuType getTypeFromList(List<MenuType> l, int menuTypeID){
		for(MenuType m : l ){
			if(m.getMenuType() == menuTypeID)
				return m;
		}
		return null;
	}
	
	public static Seller getSellerFromList(List<Seller> l, String sellerID) {
		for (Seller seller : l) {
			if (seller.getSellerID().equals(sellerID)) {
				return seller;
			}
		}
		return null;
	}
}
